<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>子组件的实例化的过程</title>
</head>
<body>
  <div id="app">{{name}}<name-component></name-component></div>
  <script src="../node_modules/vue/dist/vue.js"></script>
  <script>
    const NameComponent = {
      template: `<h1>我是子组件</h1>`
    }

    new Vue({
      el: '#app',
      components: {
        NameComponent
      },
      data() {
        return {
          name: 'lihh',
          arr: [1, 2, 3, 4]
        }
      }
    })
  </script>
</body>
</html>